<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:url value="/borrow/edit" var="borrowEditUrl"/>
<script type="text/javascript">
    $(document).ready(function(){
        $("#borrowIndex").datagrid({
            height:"100%",
            tableWidth:"100%",
            showToolbar:false,
            showLinenumber:false,
            showEditbtnscol:false,
            dataUrl:"<c:url value="/borrow/data"/>"
        });
    });

    function datagrid_tree_operation(){
		var html = "<button type=\"buttont\" class=\"btn-green\" data-toggle=\"edit.datagrid.tr\" data-options=\"{dialog:{url:'borrow/toAuditing?borrowId={id}'}}\">审核</button>";
		return html;
    }

    function hrefName(value){
		var html = "<a href=\"javascript:void(0);\" data-toggle=\"edit.datagrid.tr\" data-options=\"{dialog:{url:'borrow/edit?id={id}'}}\">"+value+"</a>";
		return html;
    }
</script>
s
<div class="bjui-pageContent">
    <table class="table table-bordered" id="borrowIndex">
    	<thead>
    		<tr>
    			<th data-options="{name:'id'}">编号</th>
    			<th data-options="{name:'name',render:hrefName}">名称</th>
    			<th data-options="{name:'investRate'}">年化收益</th>
    			<th data-options="{name:'period'}">周期</th>
    			<th data-options="{name:'totalMoney'}">发标金额</th>
    			<th data-options="{name:'createTime',pattern:'yyyy-MM-dd HH:mm:ss'}">创建时间</th>
    			<th data-options="{render:datagrid_tree_operation}">操作列</th>
    		</tr>
    	</thead>
    </table>
</div>
